<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "shipment".
 *
 * @property integer $id
 * @property string $code
 * @property string $name
 * @property string $description
 * @property string $url
 * @property string $config
 * @property string $print
 * @property integer $is_cod
 * @property integer $sort_order
 * @property integer $status
 * @property integer $created_at
 * @property integer $updated_at
 */
class Shipment extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'shipment';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['code', 'name', 'created_at', 'updated_at'], 'required'],
            [['config', 'print'], 'string'],
            [['is_cod', 'sort_order', 'status', 'created_at', 'updated_at'], 'integer'],
            [['code'], 'string', 'max' => 32],
            [['name'], 'string', 'max' => 64],
            [['description', 'url'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'name' => 'Name',
            'description' => 'Description',
            'url' => 'Url',
            'config' => 'Config',
            'print' => 'Print',
            'is_cod' => 'Is Cod',
            'sort_order' => 'Sort Order',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
